import { requestGet } from "@/utils/request";
import type { MenuListResponse } from "./types"

export function getMenuListApi(): Promise<MenuListResponse[]> {
    return new Promise((resolve) => {
        const menusList: MenuListResponse[] = [
            {
                id: 1,
                parentId: 0,
                type: "menu",
                hrefType: "",
                title: "控制台",
                icon: "Odometer",
                path: "/home/console",
                component: "/src/layout/Layout.vue",
                name: "menu",
            },
            {
                id: 2,
                parentId: 0,
                type: "dir",
                hrefType: "",
                title: "权限管理",
                icon: "Odometer",
                path: "/permission",
                component: "/src/layout/Layout.vue",
                name: "permission",
                children: [
                    {
                        id: 3,
                        parentId: 2,
                        type: "menu",
                        hrefType: "",
                        title: "管理员管理",
                        icon: "Odometer",
                        path: "/permission/admin",
                        component: "/src/views/Home/Console.vue",
                        name: "admin",
                    },
                    {
                        id: 4,
                        parentId: 2,
                        type: "menu",
                        hrefType: "",
                        title: "管理员日志",
                        icon: "Odometer",
                        path: "/permission/log",
                        component: "/src/views/Home/Console.vue",
                        name: "log",
                    },
                    {
                        id: 5,
                        parentId: 2,
                        type: "menu",
                        hrefType: "",
                        title: "角色管理",
                        icon: "Odometer",
                        path: "/permission/role",
                        component: "/src/views/Home/Console.vue",
                        name: "role",
                    },
                    {
                        id: 6,
                        parentId: 2,
                        type: "menu",
                        hrefType: "",
                        title: "部门管理",
                        icon: "Odometer",
                        path: "/permission/department",
                        component: "/src/views/Home/Console.vue",
                        name: "department",
                    }
                ]
            },
            {
                id: 7,
                parentId: 0,
                type: "dir",
                hrefType: "",
                title: "常规管理",
                icon: "Odometer",
                path: "/routine",
                name: "routine",
                component: "/src/layout/Layout.vue",
                children: [
                    {
                        id: 8,
                        parentId: 7,
                        type: "menu",
                        hrefType: "",
                        title: "系统配置",
                        icon: "Odometer",
                        path: "/routine/syste-config",
                        component: "/src/views/Home/Console.vue",
                        name: "systemConfig",
                    },
                    {
                        id: 9,
                        parentId: 7,
                        type: "menu",
                        hrefType: "",
                        title: "附件管理",
                        icon: "Odometer",
                        // path: "/routine/attachment",
                        path: "/routine/attachment",
                        component: "/src/views/Home/Console.vue",
                        name: "attachment",
                    },
                    {
                        id: 10,
                        parentId: 7,
                        type: "menu",
                        hrefType: "",
                        title: "个人资料",
                        icon: "Odometer",
                        path: "/routine/profile",
                        component: "/src/views/Home/Console.vue",
                        name: "profile",
                    }
                ]
            },
        ]
        return resolve(menusList);
    })
}

export function getUserInfoApi() {
}